Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add rocketmq binding #554

Merged
merged 2 commits into from
May 23, 2023
Merged

feat: add rocketmq binding #554

merged 2 commits into from
May 23, 2023

Conversation

aaron-ai
Copy link
Contributor

Fixes #494

@aaron-ai aaron-ai force-pushed the rocketmq branch 3 times, most recently from 7428107 to 8db234c Compare April 26, 2023 11:41
@aaron-ai
Copy link
Contributor Author

@pierDipi Could you please take a look?

Comment on lines +49 to +48
final ByteBuffer byteBuffer = message.getBody();
byte[] body = new byte[byteBuffer.remaining()];
byteBuffer.get(body);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the buffer "copy"? I can see how this is the safest option, however, what if I don't want any additional buffering and copies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually the ByteBuffer returned is readonly, so we have to copy it.

@pierDipi
Copy link
Member

Thanks @aaron-ai, overall, it looks good and the binding spec seems simple to follow and implement

@aaron-ai
Copy link
Contributor Author

@pierDipi Thanks for you review! Could you help to re-run the workflow?

Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have another suggestion, can we use a single package instead of the impl package? I know some components in the SDK are using that approach (I'd like to move away from that), however, that forces us to make some APIs public where they could be package-private.

Signed-off-by: Aaron Ai <yangkun.ayk@alibaba-inc.com>
Signed-off-by: Aaron Ai <yangkun.ayk@alibaba-inc.com>
@aaron-ai
Copy link
Contributor Author

I have another suggestion, can we use a single package instead of the impl package? I know some components in the SDK are using that approach (I'd like to move away from that), however, that forces us to make some APIs public where they could be package-private.

Very nice suggestion! I have updated the related part according to your suggestion.

Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aaron-ai!

LGTM

@pierDipi pierDipi merged commit 698cdf7 into cloudevents:main May 23, 2023
4 checks passed
alexec pushed a commit to alexec/sdk-java that referenced this pull request Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration with Apache RocketMQ
2 participants